package com.zx.cashiersystem.utils;

import android.app.Activity;
import android.view.WindowManager;



/**
 * Created by stone on 2016/12/23.
 */

public class DialogUtils {
    private static final String TAG = "DialogUtils";
    private Activity context;

    public DialogUtils(Activity context) {
        this.context = context;
    }
    /**
     * 设置添加屏幕的背景透明度1:完全透明，0.5半透明
     * @param bgAlpha
     */
    public void backgroundAlpha(Activity context, float bgAlpha)
    {
        WindowManager.LayoutParams lp = context.getWindow().getAttributes();
        lp.alpha = bgAlpha;
        context.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
        context.getWindow().setAttributes(lp);
    }

    String property = null ;
    String standard = null;
    int num = 0;




    private PropertyListener mListener;
    //接口回调的方法
    public interface PropertyListener {
        void dataTransmission(String property, String standard, int num);
    }
    public void PropertyListener(PropertyListener mListener) {
        this.mListener = mListener;
    }


    public interface OnClickListener{
        void onClick(Object obj);
    }
}
